#define _CRT_SECURE_NO_WARNINGS 1
#include"game.h"
int i = 0;
void creat(tree** root, char* p)
{
	assert(root);
	if (p[i] == '\0' || p[i] == '#')
	{
		i++;
		return;
	}
	if (*root == NULL)
	{
		tree* new = (tree*)malloc(sizeof(tree));
		assert(new);
		new->left = NULL;
		new->right = NULL;
		new->val = p[i];
		*root = new;
		i++;
	}
	creat(&(*root)->left, p);
	creat(&(*root)->right, p);
}
void creattree(char* p)
{
	tree* root = NULL;
	creat(&root, p);
}
void test()
{
	char* p = "ABD##E#H##CF##G##";
	i = 0;
	creattree(p);
}
int main()
{
	test();
	return 0;
}